package com.kob.backend.controller.favorite;

import com.kob.backend.mapper.FavoriteMapper;
import com.kob.backend.service.favorite.FavoriteDeleteservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class FavoriteDeleteController {
    @Autowired
    private FavoriteDeleteservice favoriteDeleteservice;
    @PostMapping("/favorite/delete/")
    public Map<String,String> deletefavorite(@RequestParam Map<String,String> map)
    {
        Integer userid = Integer.parseInt(map.get("userid"));
        Integer productid = Integer.parseInt(map.get("productid"));
        return favoriteDeleteservice.daletefavorite(userid,productid);

    }
}
